package com.gao.api.gate.quick.proto.filter;

import com.gao.api.gate.quick.proto.http.HttpRequestContext;

import java.util.function.Consumer;
import java.util.function.Predicate;

/**
 * <p></p>
 *
 * @author gaoshuangwen
 * @since 2022/01/07 15:00
 */
public class FilterDefinition {
    private String filterGroup;
    private String filterName;
    private int order = 0;
    private Class<? extends Filter> filterClass;
    private boolean sync = true;
    private FilterType filterType;
    private boolean disabled;
    private Predicate<HttpRequestContext> shouldPredicate;

    public String getFilterGroup() {
        return filterGroup;
    }

    public void setFilterGroup(String filterGroup) {
        this.filterGroup = filterGroup;
    }

    public String getFilterName() {
        return filterName;
    }

    public void setFilterName(String filterName) {
        this.filterName = filterName;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public Class<? extends Filter> getFilterClass() {
        return filterClass;
    }

    public void setFilterClass(Class<? extends Filter> filterClass) {
        this.filterClass = filterClass;
    }

    public boolean isSync() {
        return sync;
    }

    public void setSync(boolean sync) {
        this.sync = sync;
    }

    public FilterType getFilterType() {
        return filterType;
    }

    public void setFilterType(FilterType filterType) {
        this.filterType = filterType;
    }

    public boolean isDisabled() {
        return disabled;
    }

    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }

    public Predicate<HttpRequestContext> getShouldPredicate() {
        return shouldPredicate;
    }

    public void setShouldPredicate(Predicate<HttpRequestContext> shouldPredicate) {
        this.shouldPredicate = shouldPredicate;
    }
}
